import json


class Json_Option:
    def __init__(self, file_path):
        self.file_path = file_path

    def write_json(self, data):
        with open(self.file_path, 'w') as f:
            json.dump(data, f, indent=4)

    def read_json(self):
        try:
            with open(self.file_path, 'r') as f:
                return json.load(f)
        except FileNotFoundError:
            print(f"文件 {self.file_path} 未找到")
            return None
